/* HMAC-SHA1: Keyed-Hashing for Message Authentication
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2, or (at your option) any
 * later version.
 */


#ifndef __HMAC_SHA1__
#define __HMAC_SHA1__

#include <stdint.h>
#include "sha1.h"

#define HMAC_SHA1_SIZE 20

struct HmacSha1Context
{
	uint8_t key[64];	// 64-byte key
	struct SHA1Context hash;
};

void HmacSha1Init(struct HmacSha1Context *ctx, const void *key, unsigned int len);
void HmacSha1Update(struct HmacSha1Context *ctx, const void *data, unsigned int len);
void HmacSha1Final(unsigned char digest[20], struct HmacSha1Context *ctx);
void HmacSha1HexString(char hex[41], const unsigned char digest[20]);

#endif
